<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>活动管理-编辑活动</title>
        <script>
        {% if error %}
        alert("{{error}}");
        {% end %}
        </script>
    </head>
    <body>
        <h2>编辑活动</h2>
        <form action="" method="post" accept-charset="utf-8"> 
            <p><span>活动名称</span></p>
            <p><input type="text" id="caption" name="caption" size="30" value="{{act.get("caption", "")}}"/></p>
            <p><span>活动内容</span></p>
            <p><textarea rows="15" id="content" name="content" cols="60" >{{act.get("content", "")}}</textarea></p>
            <p><span>名额</span></p>
            <p><input type="text" id="amount" name="amount" size="30" value="{{act.get("amount", "")}}"/></p>
            <p><span>截止时间</span></p>
            {% import datetime %}
            <p><input type="text" id="endtime" name="endtime" size="30" value="{{act.get("endtime", "") or (datetime.datetime.utcnow() + datetime.timedelta(hours=8)).strftime("%Y-%m-%d %H:00:00")}}"/></p>
            <p>
                <span>已报名</span>
                <select name="applied" id="applied" value="">
                    {% for applier in act.get("appliers", {}) %}
                    <option>{{applier}}</option>
                    {% end %}
                </select>
                <a href="javascript:void(0)" onclick="">删除</a>
            </p>            
            <p><button type="submit" name="提交">提交</button></p> 
        </form>
    </body>
</html>
